package com.lehecai.core.search.converter.impl;

import com.lehecai.core.search.converter.ISearchEntityPropertyConverter;
import net.sf.json.JSONArray;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 抽象类实现，不做转换原样返回
 * User: sunshow
 * Date: 13-4-11
 * Time: 上午9:31
 */
public abstract class AbstractSearchEntityPropertyConverter implements ISearchEntityPropertyConverter {

    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public Object convertFromSearch(Object property) throws Exception {
        return property;
    }

    @Override
    public Object convertToSearch(Object property) throws Exception {
        return property;
    }

    @Override
    public Object getFromJSON(JSONArray jsonArray, int index) throws Exception {
        return jsonArray.get(index);
    }
}
